﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PDO.Utilities
{
    
    public class ConfigurationSettingsException : BasePDOException
    {
        //
        // For guidelines regarding the creation of new exception types, see
        //    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp
        // and
        //    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp
        //

        public ConfigurationSettingsException(string configurationString) 
        {
            AppendMessage(configurationString);
        }
        public ConfigurationSettingsException(string configurationString, string message) : base(message) 
        {
            message += AppendMessage(configurationString);
        }
        public ConfigurationSettingsException(string configurationString, string message, Exception inner) : base(message, inner) 
        {
            message += AppendMessage(configurationString);
        }

        private string AppendMessage(string configurationString)
        {
            return "Configuration Setting, " + configurationString +", could not be read.";
        }
    }    
}
